import 'package:finance_app/generated/json/base/json_convert_content.dart';
import 'package:finance_app/generated/json/base/json_field.dart';

class AccountReceivablesPayablesEntity with JsonConvert<AccountReceivablesPayablesEntity> {
  int line;
  @JSONField(name: "Type *")
  String typeStar;
  @JSONField(name: "No.*")
  int noStar;
  @JSONField(name: "Party Name*")
  int partyName;
  @JSONField(name: "Issue date*")
  dynamic issueDate;
  @JSONField(name: "Due date*")
  dynamic dueDate;
  @JSONField(name: "Currency*")
  String currency;
  @JSONField(name: "Amount*")
  num amount;
  @JSONField(name: "Memo")
  num memo;

  String default_currency_code;
  num default_currency_amount;

  AccountReceivablesPayablesEntity(
      {this.line,
      this.typeStar,
      this.noStar,
      this.partyName,
      this.issueDate,
      this.dueDate,
      this.currency,
      this.amount,
      this.memo,
      this.default_currency_amount,
      this.default_currency_code});

  factory AccountReceivablesPayablesEntity.fromJson(Map<String, dynamic> json) {
    return AccountReceivablesPayablesEntity(
      typeStar: json['Type*'],
      noStar: json['No.*'],
      partyName: json['Party Name*'],
      issueDate: json['Issue date*'],
      dueDate: json['Due date*'],
      line: json['line'],
      memo: json['Memo'],
      currency: json['Currency*'],
      amount: json['Amount*'],
      default_currency_amount: json['default_currency_amount'],
      default_currency_code: json['default_currency_code'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Type *'] = this.typeStar;
    data['No.*'] = this.noStar;
    data['Party Name*'] = this.partyName;
    data['Issue date*'] = this.issueDate;
    data['Due date*'] = this.dueDate;
    data['line'] = this.line;
    data['Memo'] = this.memo;
    data['Currency*'] = this.currency;
    data['Amount*'] = this.amount;
    data['default_currency_amount'] = this.default_currency_amount;
    data['default_currency_code'] = this.default_currency_code;
    return data;
  }
}
